//
//  CFTimeQuartzView.m
//  CFfuturestalent
//
//  Created by 子yu 刘 on 2018/5/4.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "CFTimeQuartzView.h"

@implementation CFTimeQuartzView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self initView];
    }
    return self;
}

- (void)initView{

    CGFloat width = self.frame.size.width;
    CGFloat height = self.frame.size.height;
    self.quartzTimeView = [[AFTimeQuartzView alloc] initWithFrame:CGRectMake(0, 0, width-134, height*260/415)];
    [self addSubview:self.quartzTimeView];

    UILabel * leftLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, height*260/415, 100,height*25/415)];
    leftLabel.text = @"06:00";
    leftLabel.textColor = DEF_COLOR_HOMETEXTDARKCOLOR;
//    leftLabel.backgroundColor = [UIColor greenColor];
    [self addSubview:leftLabel];
//
//    UILabel * rightLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.quartzTimeView.frame)-100, CGRectGetMaxY(self.quartzTimeView.frame), 100, 25/415*height)];
//    rightLabel.text = @"05:00";
//    rightLabel.textColor = DEF_COLOR_HOMETEXTDARKCOLOR;
//    [self addSubview:rightLabel];
    
//    UIView * view = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.quartzTimeView.frame)-100, CGRectGetMaxY(self.quartzTimeView.frame), 100, 25/415*height)];
//    view.backgroundColor = [UIColor redColor];
//    [self addSubview:view];

    UIView * rightView = [[UIView alloc] initWithFrame:CGRectMake(width-134, 0, 134, height)];
    rightView.backgroundColor = [UIColor  whiteColor];
    [self addSubview:rightView];

    
    //260/415
    
}

- (void)reloadData{
    //[self.quartzTimeView setNeedsDisplay];
}
@end
